package com.day.newcorp;

import java.text.DecimalFormat;

public class Field {

	private int position;
	private String value;
	private String name;

	public Field(int position, String name, String value) {
		super();
		this.position = position;
		this.name = name;
		this.value = value;
	}

	public Field(int position, String value) {
		super();
		this.position = position;
		this.value = value;
	}

	public int getPosition() {
		return position;
	}

	public void setPosition(int position) {
		this.position = position;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Override
	public String toString() {
		return new DecimalFormat("00").format(2 + value.length())
				+ new DecimalFormat("00").format(position) + value;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
